<?php

/*
 * @Date: 2025-07-11 17:25:51
 * @LastEditors: 贾二小 erxiao.jia@outlook.com
 * @LastEditTime: 2025-10-28 21:45:50
 * @FilePath: /admin-api/database/seeders/DatabaseSeeder.php
 */

namespace Database\Seeders;

use App\Models\Menu;
use App\Models\User;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;

class DatabaseSeeder extends Seeder
{
    /**
     * Seed the application's database.
     */
    public function run(): void
    {
        User::factory(500)->create();

        User::find(1)->update([
            'username' => 'admin',
            'name' => 'Admin',
            'email' => 'admin@example.com',
        ]);

        //填充菜单数据
        $this->call([
            MenuSeeder::class,
            RoleSeeder::class,
            PermissionSeeder::class,
        ]);
    }
}
